<script setup lang="ts">
import { computed } from 'vue';
import { useLocaleStore } from '@/store/locale'

import zhCn from 'element-plus/es/locale/lang/zh-cn'
import en from 'element-plus/es/locale/lang/en'

const localeStore = useLocaleStore()
const locale = computed(() => localeStore.currentLocale === 'zh' ? zhCn : en)

</script>

<template>
  <el-config-provider :locale="locale">
    <router-view />
  </el-config-provider>
</template>

<style scoped></style>
